import request from '@/utils/request'

// 产品列表
export function listProducts(query) {
	return request({
		url: '/api/warehouses/products/collections',
		method: 'get',
		params: query
	})
}

// 列表
export function list(query) {
	return request({
		url: '/api/warehouses',
		method: 'get',
		params: query
	})
}

// 修改
export function update(data) {
	return request({
		url: '/api/warehouses',
		method: 'put',
		data
	})
}

// 新增
export function add(data) {
	return request({
		url: '/api/warehouses',
		method: 'post',
		data
	})
}

// 详情
export function detail(query) {
	return request({
		url: '/api/warehouses/' + query.id,
		method: 'get'
	})
}

// 删除
export function remove(query) {
	return request({
		url: '/api/culturePonds/monitoringFactors/' + query.id,
		method: 'delete'
	})
}